<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'findAllUserActionAjax.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script src="jquery-1.7.2.js" type="text/javascript"></script>	
	<script type="text/javascript">
	function sendMessage(){
		/*	alert(new Date(1351313548187).toLocaleTimeString());*/
			$.post(
				"findUser.action",
				{
				popedom:$("#text").val()	
				},
				function(data,status){
					/*$("#chats").append(data.text+"<br>");*/
					/* $("#chats").append(data.replyText+"<div>"+data.text+"</div>");*/
			/*$("#chats").append("<table width="465" height="92" border="0">");*/
			$("#chats").html("");
			$("#chats").append("<tr><td>用户age</td>   <td>用户名</td></tr>");
		
			$.each(data.allUser,function(i,item){
				$("#chats").append("<tr>"+"<td>"+item.age+"</td>"+"   <td>"+item.username+"</td>"+"</tr>")}
			);
			
			/*$("#chats").append("</table>");*/
		
				}
			);
		}
		</script>
  </head>
  
  <body>
 <font>显示</font> <br>
   <div id="chats"></div><br>
    <textarea rows="5" cols="20" id="text"></textarea><br>
    <input value="发送" type="submit" id="send" onClick="sendMessage();"/>
    <!--
    <a href="findAllUser?popedom=3">查询所有popedom=3的用户</a><br>
  -->
  </body>
</html>
